package entity;

import java.util.Comparator;

import enumeration.Action;

public class ActionKV implements Comparator<ActionKV> {

	private Action action;
	private double value;

	public ActionKV() {
		super();
	}

	public ActionKV(Action action, Double value) {
		super();
		this.action = action;
		this.value = value;
	}

	public Action getAction() {
		return action;
	}

	public void setAction(Action action) {
		this.action = action;
	}

	public double getValue() {
		return value;
	}

	public void setValue(double value) {
		this.value = value;
	}

	@Override
	public int compare(ActionKV o1, ActionKV o2) {
		int result = (int) (o2.getValue() - o1.getValue());
		return result - 1;
	}

}
